package com.frame.pageform.remote;

import java.util.HashMap;
import java.util.Map;

public class RemoteConfig {

	private Map<String,String> serverMap=new HashMap<String,String>();

	public String getServer(String serverName){
		return serverMap.get(serverName);
	}
	public void setServer(String server) throws Exception {
		String[] ss=server.split("\\|");
		for(String s:ss){
			String[] bs=s.split(":=");
			if(bs.length<=1)
				throw new Exception("RemoteConfig定义的server属性格式不正确");
			if(bs[1].length()>0)
				serverMap.put(bs[0], bs[1]);
		}
	}

}
